POV-Ray : Newsgroups : povray.general : rendering skyboxes : Re: rendering skyboxes Server Time
2 Nov 2024 05:19:35 EDT (-0400)
  Re: rendering skyboxes  
From: Slime
Date: 8 May 2004 02:18:33
Message: <409c7bb9@news.povray.org>
> I have an OpenGL project, and I was wanting to use pov to render textures
> for my skybox.  Dos anyone have any experience with this?

This code is from a scene which I used to render a sky box for one of *my*
openGL programs:

camera {
 location 0
 right x
 up y
 direction z

 angle 90

 #if (frame_number = 0)
  look_at  x
 #else #if (frame_number = 1)
  look_at  -x
 #else #if (frame_number = 2)
  look_at  y
 #else #if (frame_number = 3)
  look_at  -y
 #else #if (frame_number = 4)
  look_at  z
 #else #if (frame_number = 5)
  look_at  -z
 #end #end #end #end #end #end
}

use it in an animation with 6 frames (0 through 5), and a square output
aspect ratio, and there are your 6 images which should be texture mapped to
squares surrounding the camera. You just have to rotate them right.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.